package cn.maxhou.mapper;

import cn.maxhou.pojo.SysUser;
import org.apache.ibatis.annotations.Param;

import java.util.Date;
import java.util.List;
import java.util.Map;

public interface SysUserMapper {

    /**
     * 查询用户列表(分页查询)
     * @Param realNmae
     * @Param roleId
     * @return
     */
    public List<SysUser> selectList(@Param("realName")String realName,@Param("roleId") Integer roleId);

    public List<SysUser> selectListByChoose(@Param("realName")String realName, @Param("account")String account, @Param("createdTime") Date createdTime, @Param("roleId") Integer roleId);

    public List<SysUser> getUserByRoleIdArray(Integer[] roleIds);

    /**
     *根据角色id集合查询用户列表信息
     *@Param roleList
     *@return
     */
    public List<SysUser> getUserByRoleIdList(List<Integer> roleIds);

    /**
    *根据角色ID集合(集合存在Map中)查询用户列表信息
    *@Param roleMap
    *@return
     */
    public List<SysUser>getUserByRoleIdMap(Map<String, Object> roleIdMap);

    /**
     * 修改sys_user
     */
    public int update(SysUser user);

    /**
     *分页查询用户列表
     * @param realName
     * @param roleId
     * @param pageBegin
     * @param pageSize
     * @return
     */
    public List<SysUser>setlectPageList(@Param("realName") String realName,
            @Param("roleId") Integer roleId,
            @Param("pageBegin") Integer pageBegin,
            @Param("pageSize") Integer pageSize);
}
